class person:
    name = ''
    sex = ''
    age = 0
    phone_bill = 0
    phone_brand = ''
    battery_capacity = 0
    screen_size = 0
    standby_time = 0
    points = 0

    def send_short_message(self, content):
        print('短信内容是：', content)

    def ring_up(self, phone_num, ring_time):
        if len(phone_num) == 0:
            print('没有输入电话号码！')
        elif self.phone_bill < 1:
            print('话费不足！')
        else:
            print('电话拨通！')
            if 0 <= ring_time < 10:
                print('你本次扣除了', ring_time*1, '元话费，获得了', ring_time*15, '个积分')
                return ring_time*1
            elif 10 <= ring_time < 20:
                print('你本次扣除了', ring_time * 0.8, '元话费，获得了', ring_time * 39, '个积分')
                return ring_time * 0.8
            else:
                print('你本次扣除了', ring_time * 0.65, '元话费，获得了', ring_time * 48, '个积分')
                return ring_time * 0.65


p1 = person()
p1.phone_bill = 30
p1.ring_up('185', 30)

p2 = person()
p2.phone_bill = 0
p2.ring_up('185', 30)